<#setting number_format="#">
<?xml version="1.0" encoding="GB2312"?>
<battleGroup>
        <redGroup bzID="${redGroup.bzId!""}" bcID="-1" name="${redGroup.name!""}" dwdz="" side="0" parentID="${redGroup.parentId!""}" rotate="0">
            <#if flag?? && flag == false>
                <unit bzID="${root.bzId!""}" bcID="-1" name="${root.name!""}" dwdz="" side="0" jz="" bz="500" jb="${root.rank!""}" jbh="0-0" parentID="${root.parentId!""}" JDiantype="${root.type!""}" forceType="${root.forceType!""}" posX="-999999" posY="-999999" rotate="0" stateID="1" unitPosture="0" unitType="1" formationType="" deployTime="">
            </#if>
                <#macro bpTree children>
                <#if children?? && children?size gt 0>
                    <#list children as e>
                        <#if e.type == 0>
                             <unit bzID="${e.bzId!""}" bcID="-1" name="${e.name!""}" dwdz="" side="0" jz="" bz="500" jb="${e.rank!""}" jbh="0-0" parentID="${e.parentId!""}" JDiantype="${e.type!""}" forceType="${e.forceType!""}" posX="-999999" posY="-999999" rotate="0" stateID="1" unitPosture="0" unitType="1" formationType="" deployTime="">
                             <@bpTree children=e.children />
                        <#else>
                             <unit bzID="${e.bzId!""}" bcID="-1" name="${e.name!""}" dwdz="" side="0" jz="1" bz="2" jb="${e.rank!""}" jbh="0-0" parentID="${e.parentId!""}" JDiantype="${e.type!""}" forceType="${e.forceType!""}" posX="-999999" posY="-999999" rotate="0" stateID="1" unitPosture="0" unitType="1" formationType="" deployTime="">
                                 <#if e.equipment?? && e.equipment?size gt 0>
                                     <#list e.equipment as k>
                                         <#if k.militaryLabel??>
                                             <soldier id="${k.id!""}" name="${k.name!""}" className="${k.className!""}" jbh="${k.militaryLabel!""}" jbzType="${k.code!""}" count="${k.count!""}" marker3d="${k.className!""}" fightCapacity="${k.fightCapacity!""}">
                                             </soldier>
                                         <#else>
                                             <zb ZBLDM="${k.code!""}" equipid="${k.id!""}" count="${k.count!""}" className="${k.className!""}" equipName="${k.name!""}">
                                             </zb>
                                          </#if>
                                     </#list>
                                 </#if>
                             </unit>
                        </#if>
                        <#if e.type == 0>
                            </unit>
                        </#if>
                    </#list>
                </#if>
            </#macro>
            <@bpTree children=root.children />
            <#if flag?? && flag == false>
                </unit>
            </#if>
        </redGroup>
</battleGroup>